package com.lianzhihui.romeex.mvp.presenter;

import android.content.Context;

import com.lianzhihui.romeex.bean.FlowCellBean;
import com.lianzhihui.romeex.mvp.model.FlowCellInterface;
import com.lianzhihui.romeex.mvp.model.FlowCellModelImp;
import com.lianzhihui.romeex.mvp.model.UpdateInterface;
import com.lianzhihui.romeex.mvp.model.UpdateModelImp;
import com.lianzhihui.romeex.mvp.view.FlowCellView;
import com.lianzhihui.romeex.mvp.view.UpdateView;

/**
 * Description:
 * Author: RAMON
 * CreateDate: 11/30/20 2:13 PM
 * UpdateUser:
 * UpdateDate:
 * UpdateRemark:
 * Version:
 */
public class UpdatePresenter implements UpdateInterface {

    Context context;
    UpdateView iView;
    UpdateModelImp iModel;

    public UpdatePresenter(Context context, UpdateView iView) {
        this.context = context;
        this.iView = iView;
        iModel = new UpdateModelImp(context, this);
    }

    public void getUpdate(String sum) {
        iModel.getUpdate(sum);
    }


    @Override
    public void onFailure() {

    }

    @Override
    public void onUpdate() {
        iView.onUpdate();
    }

    @Override
    public void onUpdateFail(String message) {
        iView.onUpdateFail(message);
    }
}
